#!/usr/bin/env python
# -*- encoding: utf-8 -*-
# Project: spd-sxmcc
"""
@author: lyndon
@time Created on 2018/12/7 14:45
@desc
"""

import logging
import time
from analyzer.conf import settings

from analyzer.es.EsTool import EsTool

est = EsTool(hosts=["192.168.20.110", "192.168.20.111", "192.168.20.112"], timeout=5000)

body = {
    "query": {
        "match": {
            "content": '笔记'
        }
    },
    "highlight": {
        "fields": {
            "content": {

            }
        }
    }
}


content_search = est.get_search(index_name='tb_library', doc_type_name='_doc', body=body)

print(content_search)


